<template>
  <van-nav-bar
    title="宝贝分类"
    left-text="返回"
    left-arrow
    @click-left="onClickLeft"
    @click-right="onClickRight"
  >
  </van-nav-bar>
</template>

<script>
  import Vue from 'vue';
  import { NavBar } from 'vant';
  import { Button } from 'vant';

  Vue.use(Button);
  Vue.use(NavBar);
  export default {
    name:'Header',
    methods: {
      onClickLeft() {
        this.$router.push({
          // 实现路由的跳转,跳转到首页
            path: '/sell',
        })
      },
      onClickRight() {
        Toast('按钮');
      }
    }
  }
</script>

<style>
  .van-nav-bar__left{
    color: black;
  }
</style>
